<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">
	<rich:popupPanel id="questionSheetDetail" autosized="true" modal="true" moveable="true" show="#{QuestionSheetOverviewViewBean.showInnerComp}">
		<f:facet name="header"><center>Fragebogen Dtail</center></f:facet>
	<!-- imports -->
	<script language="JavaScript" src="../js/FrageHinzufuegen.js"></script>
	<!-- imports -->
		<center><h:outputLabel value="Fragebogen ändern/löschen" styleClass="ueberschrift"/></center>
		<h:form id="ChangeQuestionSheet">
		<table id="ChangeQuestionSheet_table" class="standart kontoverwaltung">
			<tr>
				<td><h:outputText value="Bezeichnung:" /></td>
				<td><h:inputText readonly="#{!QuestionSheetOverviewViewBean.canAccessAll()}" value="#{QuestionSheetOverviewViewBean.changeLabel}" /></td>
			</tr>
			<tr>
				<td colspan="2"><center>
					<rich:panel style="width: 600px;">
						<center><rich:pickList disabled="#{!QuestionSheetOverviewViewBean.canAccessAll()}" value="#{QuestionSheetOverviewViewBean.selectedQuestions}" sourceCaption="Available Questions" targetCaption="Selected Questions" listWidth="130px" listHeight="260px" orderable="false">
                			<f:selectItems value="#{QuestionSheetOverviewViewBean.notselectedQuestions}"  var="question"  itemValue="#{question}" itemLabel="#{question.text}" />
           		 			<f:converter converterId="QuestionConverter" />
           		 		</rich:pickList></center>
           		 		<hr width="80%" style="margin:5px;"/>
					</rich:panel></center>
				</td>
			</tr>
			<tr>
				<td><center><a4j:commandButton action="#{QuestionSheetOverviewViewBean.changeQuestionSheet()}" disabled="#{!QuestionSheetOverviewViewBean.canAccessAll()}" execute="ChangeQuestionSheet" onbegin="#{rich:component('Loadingpopup')}.show();" oncomplete="#{rich:component('Loadingpopup')}.hide();" value="speichern" render="Messagespopup questionSheetupdateForm ChangeQuestionSheet"/></center></td>
				<td><center><a4j:commandButton action="#{QuestionSheetOverviewViewBean.deleteQuestionSheet()}" disabled="#{!sessionManagerBean.userinfo.user.benutzerrolle.bezeichnung.equals('Administrator')}" onbegin="#{rich:component('Loadingpopup')}.show();" oncomplete="#{rich:component('Loadingpopup')}.hide();#{rich:component('questionSheetDetail')}.hide();" value="löschen" render="Messagespopup questionSheetupdateForm"/></center></td>
				<td><center><a4j:commandButton action="#{QuestionSheetOverviewViewBean.innerCompHide()}" onbegin="#{rich:component('Loadingpopup')}.show();" oncomplete="#{rich:component('Loadingpopup')}.hide();#{rich:component('questionSheetDetail')}.hide();" value="abbrechen"/></center></td>
			</tr>
		</table>
		</h:form>
		<rich:panel styleClass="newQuestionAnswerChoiceDetailPanel">
		<f:facet name="header">Detail</f:facet>
		<h:inputTextarea id="answerChoiceDetail_changeQuestionSheet" style="width: 100%;" readonly="true"/>
		</rich:panel>
	</rich:popupPanel>								
</ui:composition>